//require 存在的意义是帮助我们引入js模块
require(['./config'], () => {
    require(['swiper', 'header', 'footer'], (Swiper, Header, Footer) => {
        class Index {
            constructor() {
                this.banner()
            }
            banner() {
                new Swiper('.swiper-container', {
                    spaceBetween: 30,
                    centeredSlides: true,
                    autoplay: {
                        delay: 2500,
                        disableOnInteraction: false
                    },
                    pagination: {
                        el: '.swiper-pagination',
                        clickable: true,
                    },
                    navigation: {
                        nextEl: '.swiper-button-next',
                        prevEl: '.swiper-button-prev',
                    },
                });
            }
            header() {
                new Header({

                })
            }
            footer() {
                new Footer({

                })
            }
        }
        new Index()
    })
})